<link href="styles/estilo.css" rel="stylesheet" type="text/css" />
<div id="fmeio">
<?php
require_once("config/funcoes.php");
$wsdl=pegar_valor("wsdl");
$proxy=pegar_valor("proxy");
$hash=pegar_valor("hash");
$userproxy=pegar_valor("userproxy");
$senhaproxy=pegar_valor("senhaproxy");
$userws=pegar_valor("userws");
$senhaws=pegar_valor("senhaws");
$tlote=pegar_valor("tlote");
$urlbase=pegar_valor("urlbase");
$laboratorio=pegar_valor("laboratorio");
$servidor_bdi=pegar_valor("servidorbd");
$nome_bdi=pegar_valor("bancodados");
$usu_bdi=pegar_valor("usuariobd");
$pwd_bdi=pegar_valor("senhabd");
$edit=$_GET[edit];
?>
<script src="config/funcoes.js" language="javascript"></script>
<form action="config/funcoes.php" name="frm_conf" id="frm_conf" method="post" enctype="application/x-www-form-urlencoded" >
<?php if($edit=="true")   {?>
          <input type="button" id="enviar" value="Salvar" onclick="javascript:doPost('frm_conf', 'salvar')" />
          <?php }?>
<input type="hidden" id="action" name="action" />
  <table>
    <tr>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <td><fieldset><legend>Servidor GAL</legend><table width="550" height="60" border="0" cellpadding="1" cellspacing="1" >
        <tr>
          <td width="97" align="right">URL WSDL:&nbsp; </td>
          <td colspan="3"><input name="wsdl" type="text" id="wsdl" size="75" value="<?php echo $wsdl; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/></td>
          </tr>
	        <tr>
          <td width="130" height="35"  align="right">Laboratorio:&nbsp;</td>
          <td width="160"><label>
            <input type="text" name="laboratorio" id="laboratorio"  value="<?php echo $laboratorio; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
		            <td align="right">Tamanho lote:</td>
          <td width="120"><label>
            <input type="text" name="tlote" id="tlote" value="<?php echo $tlote; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
        </tr>
      </table></fieldset></td>
      </tr>
<tr>
      <td><fieldset><legend>Autenticacao</legend>
      <table >
             <td width="97" align="right">Proxy Server:&nbsp; </td>
          <td colspan="3"><input name="proxy" type="text" id="proxy" size="75" value="<?php echo $proxy; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/></td>
          </tr>
	        <tr>
          <td align="right">Proxy - Usuario:&nbsp;</td>
          <td width="120"><label>
            <input type="text" name="usuarioproxy" id="usuarioproxy" value="<?php echo $userproxy; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
          <td width="130" align="right">Proxy - Senha:&nbsp;</td>
          <td width="160"><label>
            <input type="password" name="senhaproxy" id="senhaproxy"  value="<?php echo $senhaproxy; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
        </tr> 
        <tr>
          <td width="97" align="right">WS - HASH:&nbsp; </td>
          <td colspan="3"><input name="hash" type="text" id="hash" size="75" value="<?php echo $hash; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/></td>
          </tr>
          <tr>
          <td align="right">WS - Usuario:&nbsp;</td>
          <td width="120"><label>
            <input type="text" name="usuariows" id="usuariows" value="<?php echo $userws; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
          <td width="130" align="right">WS - Senha:&nbsp;</td>
          <td width="160"><label>
            <input type="password" name="senhaws" id="senhaws"  value="<?php echo $senhaws; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
        </tr> 
      </table></fieldset></td>
      </tr>
    <tr>
      <td>
      <fieldset><legend>GAL - Interface</legend>
      <table >
     		          <tr>
          <td width="97" align="right">URL Base:&nbsp; </td>
          <td colspan="3"><input name="url" type="text" id="url" size="75" value="<?php echo $urlbase ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/></td>
          </tr>
        <tr>
          <td width="99" align="right">Servidor BD:&nbsp; </td>
          <td><label>
            <input type="text" name="servidor" id="servidor" value="<?php echo $servidor_bdi; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
          <td align="right">Banco de dados:&nbsp;</td>
          <td><label>
            <input type="text" name="bancodedados" id="bancodedados" value="<?php echo $nome_bdi; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
          </tr>
        <tr>
          <td align="right">Usuario BD:&nbsp;</td>
          <td width="120"><label>
            <input type="text" name="usuariobd" id="usuariobd" value="<?php echo $usu_bdi; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?>/>
          </label></td>
          <td width="125" align="right">Senha BD:&nbsp;</td>
          <td width="163"><label>
            <input type="password" name="senhabd" id="senhabd" value="<?php echo $pwd_bdi; ?>" <?php if($edit!="true") echo "readonly='readonly'";  ?> />
          </label></td>
        </tr>
      </table></fieldset></td>
      </tr>
  </table></form>
</div>